﻿using Innoapps.FileTransfer.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace Innoapps.FileTransfer.Providers.Input
{
    [XmlInclude(typeof(Providers.Input.FileSystem))]
    public abstract class Base
    {
        #region Abstract Delegates
        public delegate void InputEventHandler(Transfer transfer);
        #endregion

        #region Protected Virtual Methods
        protected virtual void OnInputEvent(Transfer transfer)
        {
            if (InputEvent != null)
                InputEvent(transfer);
        }
        #endregion

        #region Internal Events
        internal event InputEventHandler InputEvent;
        #endregion
        #region Abstract Methods
        /// <summary>
        /// Starts the input provider
        /// </summary>
        public abstract void Start();
        /// <summary>
        /// Stops the input provider
        /// </summary>
        public abstract void Stop();
        #endregion
    }
}
